<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
  <th:block th:include="include :: header('修改项目方案')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  <form class="form-horizontal m" id="form-projectPlan-edit" th:object="${projectPlan}">
    <input id="planId" name="planId" th:field="*{planId}" type="hidden">
    <div class="form-group">
      <label class="col-sm-3 control-label"><span style="color: red; ">*</span>使用菌剂：</label>
      <div class="col-sm-8">
        <select name="microbialId" class="form-control m-b" required>
          <option value="">无</option>
          <option th:each="m:${mList}" th:value="${m.microbialId}" th:field="*{microbialId}" th:text="${m.microbialName}"></option>
        </select>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label"><span style="color: red; ">*</span>周期：</label>
      <div class="col-sm-8">
        <input id="planCycle" name="planCycle" th:field="*{planCycle}" class="form-control" type="text" maxlength="10" required>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label"><span style="color: red; ">*</span>用量：</label>
      <div class="col-sm-8">
        <input id="planDosage" name="planDosage" th:field="*{planDosage}" class="form-control" type="text" maxlength="10" required>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-3 control-label"><span style="color: red; ">*</span>预计费用(元)：</label>
      <div class="col-sm-8">
        <input id="planPrice" name="planPrice" class="form-control" th:field="*{planPrice}" type="text" maxlength="10" required>
      </div>
    </div>
  </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
  var prefix = ctx + "project/projectPlan";
  $("#form-projectPlan-edit").validate({
    rules: {
      planPrice: {
        number : true
      }
    },
    focusCleanup: true
  });

  function submitHandler() {
    if ($.validate.form()) {
      $.operate.save(prefix + "/edit", $('#form-projectPlan-edit').serialize());
    }
  }
</script>
</body>
</html>
